package com.heima.model.comment.dtos;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
@NotNull(message = "CommentSaveDTO 不能为空")
public class CommentSaveDTO {
    /**
     * 文章id
     */
    @NotNull(message = "articleId 不能为空")
    private Long articleId;
    /**
     * 评论内容
     */
    @NotNull(message = "content 不能为空")
    @Length(min = 1,max = 140,message = "评论内容超过范围")
    private String content;
}